package com.renting.modules.timer.sevice;

import com.renting.modules.timer.dao.TimerDao;
import com.renting.modules.timer.entity.Timer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

@Service
public class TimerService {

    @Autowired
    private TimerDao timerDao;

    public List<Timer> getAll() {
        List<Timer> list = new ArrayList<>();
        Iterable<Timer> iterable = timerDao.findAll();
        iterable.forEach((timer) -> list.add(timer));
        return list;
    }
}
